package com.cd.music.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author yxl 余秀良
 * @version 1.0
 * @description: F码
 * @date 2018年03月02日  下午3:22
 * @address: 四川成都
 */
@Entity
@Table(name = "FCode")
public class FCode {
    /**
     * 数据id
     */
    @Id
    @Column(nullable = false, unique = true, length = 32)
    private String id;
    /**
     * Ｆ码的值
     */
    @Column(nullable = false, unique = true, length = 32)
    private String value;
    /**
     * Ｆ码的状态(是否使用 true：已使用，false：未使用)
     */
    private boolean isUse = false;
    /**
     * 创建时间
     */
    @Column(columnDefinition = "datetime default now()")
    private Date createTime;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public boolean getIsUse() {
        return isUse;
    }

    public void setIsUse(boolean isUse) {
        this.isUse = isUse;
    }

    public Date getCreateTime() {
        return createTime != null ? (Date) createTime.clone() : null;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime != null ? (Date) createTime.clone() : null;
    }

}
